package org.qqcui.designpattern.patterns.mediator;

/**
 * 具体同事类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/5/6 17:15
 **/
public class Alarm extends Colleague {
    public Alarm(Mediator mediator, String name) {
        super(mediator, name);
        mediator.registerColleague(name, this);
    }

    @Override
    public void sendMessage(int stateChange) {
        this.getMediator().getMessage(stateChange, getName());
    }
}
